var exec = require('cordova/exec');

exports.open = function (success, error) {
  exec(success, error, "P25ScanPlugin", "open", []);
};

exports.init = function (success, error) {
  var initScan = function() {
        exec(function(result) {
            success(result)
            initScan()
        }, error, "P25ScanPlugin", "init", []);
  }
  initScan();
};